/*
 * @Description: 在线恢复
 * @Author: Zzt
 * @Date: 2022-08-16 19:21:44
 * @LastEditTime: 2022-08-17 09:24:34
 */
import { Button, Form, Input, Modal } from 'antd';
// import { useState } from 'react';

const { TextArea } = Input;

const Online = (props: any) => {
  const { visible, onClose } = props;
  const [form] = Form.useForm();
  // const [confirmLoading, setConfirmLoading] = useState(false);
  const submitFunc = () => {
    form.submit();
    onClose();
  };

  return (
    <>
      <Modal
        title="在线恢复"
        visible={visible}
        destroyOnClose
        // confirmLoading={confirmLoading}
        onCancel={onClose}
        footer={[
          <Button key="close" onClick={onClose}>
            取消
          </Button>,
          // <Button key="createAdd" type="primary">创建并添加档案</Button>,
          <Button
            key="yes"
            type="primary"
            onClick={() => {
              submitFunc();
            }}
          >
            确定恢复
          </Button>
        ]}
      >
        <h3>在您确定后，您即将恢复档案数据至到</h3>
        <Form>
          <Form.Item label="恢复到库">
            <Input></Input>
          </Form.Item>
          <Form.Item label="恢复备注">
            <TextArea></TextArea>
          </Form.Item>
        </Form>
      </Modal>
    </>
  );
};
export default Online;
